#pragma once
#include "RBTree.hpp"

template<class K>
class Set
{
public:
	class KeyofT
	{
	public:
		const K& operator()(const K& x)
		{
			return x;
		}
	};
	using iterator = typename RBTree<K,const K, KeyofT>::iterator;
	using const_iterator = typename RBTree<K, const K, KeyofT>::const_iterator;
	iterator begin()
	{
		return _t.begin();
	}
	iterator end()
	{
		return _t.end();
	}
	const_iterator begin()const
	{
		return _t.begin();
	}
	const_iterator end()const
	{
		return _t.end();
	}
	iterator find(const K& x)
	{
		return _t.find(x);
	}
	pair<iterator, bool> insert(const K& x)
	{
		return _t.insert(x);
	}
private:
	RBTree<K, const K, KeyofT> _t;
};